<template>
    <div>
        <el-form ref="form" :model="dataDetails" v-for="" label-width="80px" size="mini">
            <el-form-item v-for="(item,index,i) in dataDetails" :label="index">
                <el-input :value="item"></el-input>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                chpath: "",
                dataparameter: "",
                dataDetails: [],
                input4: ""
            }
        },
        created() {
            console.log(this.$store.getters.get_task);
            this.dataparameter = this.$store.getters.get_task[0];
            this.chpath = this.$store.getters.get_task[1].chpath;
            this.getDataPost(this.chpath, this.dataparameter).then(result => {
                this.dataDetails = result.body.args
                console.log("result详情页", this.dataDetails)
            })
        },
        methods: {
            getDataPost(pfpath, dataC) { //数据请求方法post pfpath路径, dataC 参数对象
                return new Promise((res, rej) => {
                    this.$http.post(`logic/${pfpath}`, dataC).then(result => {
                        console.log(result)
                        if (result.status === 200) { //判断数据是否请求成功
                            console.log(result)
                            res(result)
                        } else {
                            rej(false)
                        }
                    })
                })
            }

        }
    }
</script>
<style lang="scss" scoped>
    .el-select .el-input .el-input-group__prepend {
        width: 130px;
        height: 40px;
    }

    .input-with-select .el-input-group__prepend {
        background-color: #fff;
    }

</style>
